Elon Musk took the stand in a landmark courtroom battle, accusing OpenAI and CEO Sam Altman of betraying the company’s founding mission.